if (event->type == GDK_MOTION_NOTIFY || event->type == GDK_ENTER_NOTIFY)
{
- gtk_synthesize_crossing_events (toplevel, old_target, target,
- event, GDK_CROSSING_NORMAL);
+ if (!gtk_window_lookup_pointer_focus_implicit_grab (toplevel, device,
+ sequence))
+ {
+ gtk_synthesize_crossing_events (toplevel, old_target, target,
+ event, GDK_CROSSING_NORMAL);
+ }
gtk_window_maybe_update_cursor (toplevel, NULL, device);
}
target : NULL);
if (event->type == GDK_BUTTON_RELEASE)
- gtk_window_maybe_update_cursor (toplevel, NULL, device);
+ {
+ old_target = target;
+ target = _gtk_toplevel_pick (toplevel, x, y, NULL, NULL);
+ gtk_synthesize_crossing_events (toplevel, old_target, target, event,
+ GDK_CROSSING_UNGRAB);
+ gtk_window_maybe_update_cursor (toplevel, NULL, device);
+ }
break;
case GDK_SCROLL:
case GDK_TOUCHPAD_PINCH:
return focus ? gtk_pointer_focus_get_effective_target (focus) : NULL;
}
+GtkWidget *
+gtk_window_lookup_pointer_focus_implicit_grab (GtkWindow *window,
+ GdkDevice *device,
+ GdkEventSequence *sequence)
+{
+ GtkPointerFocus *focus;
+
+ focus = gtk_window_lookup_pointer_focus (window, device, sequence);
+ return focus ? gtk_pointer_focus_get_implicit_grab (focus) : NULL;
+}
+
void
gtk_window_update_pointer_focus (GtkWindow *window,
GdkDevice *device,
GtkWidget * gtk_window_lookup_effective_pointer_focus_widget (GtkWindow *window,
GdkDevice *device,
GdkEventSequence *sequence);
+GtkWidget * gtk_window_lookup_pointer_focus_implicit_grab (GtkWindow *window,
+ GdkDevice *device,
+ GdkEventSequence *sequence);
void gtk_window_update_pointer_focus (GtkWindow *window,
GdkDevice *device,